<?php use_helper('I18N', 'Date') ?>
<?php include_partial('berita/assets') ?>

<div id="sf_admin_container">
  <h1><?php //echo ('Berita List', array(), 'messages') ?></h1>

  <?php include_partial('berita/flashes') ?>

  <div id="sf_admin_header">
    <?php include_partial('berita/list_header', array('pager' => $pager)) ?>
  </div>

  <div id="sf_admin_bar">
    <?php include_partial('berita/filters', array('form' => $filters, 'configuration' => $configuration)) ?>
  </div>

  <div id="sf_admin_content">
    <form action="<?php echo url_for('berita_collection', array('action' => 'batch')) ?>" method="post">
        <table border="1" width="100%">
            <tr>
                <th>No</th>
                <th>Judul </th>
                <th>Nama Penulis</th>
                <th>Publish</th>
                <th colspan="2">Action</th>
            </tr>
      <?php foreach ($pager->getResults() as $i => $berita): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>        
          <tr>
              <td><?php echo $i?></td>
              <td><?php echo $berita->getSetKota()->getNama() ?></td>
              <td><?php echo $berita->getJudul()?></td>          
              <td><?php echo $berita->getUser()->getNama()?></td>
              <td><?php if($berita->getIsPublish()== '1'){echo "Ya";}else{echo "Tidak";}?></td>
              <td colspan="2">
                   <?php echo $helper->linkToEdit($berita, array(  'params' =>   array(  ),  'class_suffix' => 'edit',  'label' => 'Edit',)) ?>
                   <?php echo $helper->linkToDelete($berita, array(  'params' =>   array(  ),  'confirm' => 'Are you sure?',  'class_suffix' => 'delete',  'label' => 'Delete',)) ?>
              </td>
          </tr>
        <?php endforeach; ?>
        </table>
    <ul class="sf_admin_actions">
      <?php include_partial('berita/list_batch_actions', array('helper' => $helper)) ?>
      <?php include_partial('berita/list_actions', array('helper' => $helper)) ?>
    </ul>
    </form>
  </div>

  <div id="sf_admin_footer">
    <?php include_partial('berita/list_footer', array('pager' => $pager)) ?>
  </div>
</div>
